import request from '@/utils/request'

export function getCropGrowth(data){ 
  return request({
      url: `/cropGrowthPeriod/list/${data.cropId}`,
      method: 'get',  //query
    })
}

export function addCropGrowth(data){ 
  return request({
      url: `/cropGrowthPeriod/add`,
      method: 'post',
      data:data   //body
    })
}

export function updateCropGrowth(data){ 
  return request({
      url: `/cropGrowthPeriod/update`,
      method: 'post',
      data:data
    })
}

export function deleteCropGrowth(data){ 
  return request({
      url: `/cropGrowthPeriod/delete/${data.cropGrowthPeriodId}`,
      method: 'post',
    })
}

export function deleteGrowthList(data){ 
  return request({
      url: `/cropGrowthPeriod/deleteList?ids%5B%5D=${data.item}`,
      method: 'post',
    })
}